#include <cstdio>

const int mod = 9901;

int qmi(int a, int b) {
    int res = 1;
    a %= mod;
    while (b) {
        if (b & 1) res = res * a % mod;
        a = a * a % mod;
        b >>= 1;
    }
    return res;
}

int sum(int p, int k) {
    if (k == 1) return 1;
    if (k % 2 == 0) return (1 + qmi(p, k / 2)) * sum(p, k / 2) % mod; 
    return (sum(p, k - 1) + qmi(p, k - 1)) % mod;
}

int main() {
    int a, b;
    scanf("%d%d", &a, &b);
    if (!a) {puts("0"); return 0;}
    
    int res = 1;
    for (int i = 2; i * i <= a; ++ i)
        if (a % i == 0) {
            int k = 0;
            while (a % i == 0)
                a /= i, k ++ ;
            res = res * sum(i, b * k + 1) % mod;
        }
    
    if (a > 1) res = res * sum(a, b + 1) % mod;
    
    printf("%d\n", res);
    
    return 0;
}